<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <style>
    #mycanvas{
      background: skyblue;
    }
  </style>
  <body>
      <div>
        <canvas id="mycanvas" width="500" height="500"></canvas>
      </div>
    <script>
        var mycanvas=document.getElementById("mycanvas");
        var c=mycanvas.getContext("2d");

        // 画圆
        // arc(圆心x轴，圆心的y轴，半径，0, 2*Math.PI,顺时针或逆时针);

        // 圆的基本画法
        // c.strokeStyle="red";
        // c.arc(250,250,100,0,2*Math.PI);
        // c.stroke();

        // 画笑脸
        c.strokeStyle="green";
        c.arc(250,250,100,0,2*Math.PI)
        c.stroke();
        c.beginPath();
        // 左眼
        c.arc(210,210,10,0,2*Math.PI)
        c.stroke();
        c.beginPath();
        // 右眼
        c.arc(290,210,10,0,2*Math.PI)
        c.stroke();
        c.beginPath();

        // 嘴
        c.arc(250,280,45,0,Math.PI)
        c.stroke();

        




    </script>
</body>
</html>